<!--
 * @description: 
 * @Date: 2022-10-16 19:01:08
 * @LastEditTime: 2022-11-02 12:52:13
-->
<template>
  <div class="openType space-y-2">
    <div>
      <span>搜索新页面打开</span>
      <el-switch @change="change" v-model="store.state.config.openType.searchOpen" class="ml-2" />
    </div>
    <div>
      <span>标签新页面打开</span>
      <el-switch @change="change" v-model="store.state.config.openType.linkOpen" class="ml-2" />
    </div>
    <div>
      <span>进入程序自动聚焦搜索</span>
      <el-switch @change="change" v-model="store.state.config.openType.autofocus" class="ml-2" />
    </div>
  </div>
</template>
<script setup>
import { useStore } from "vuex"
const store = useStore()
const change = () => {
  store.commit("updateConfig")
}
</script>
<style lang="less">
.openType {
  >div {
    border-radius: 6px;
    background-color: rgb(255, 255, 255);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    >span {
      font-size: 13px;
    }
  }
}
</style>